<!DOCTYPE html>
<html lang="zh-cn">
   <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>{$CONF['shopTitle']['fieldValue']}后台管理中心</title>
      <link href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
      <link href="__CSS__/AdminLTE.css" rel="stylesheet" type="text/css" />
      <!--[if lt IE 9]>
      <script src="__PUBLIC__/js/html5shiv.min.js"></script>
      <script src="__PUBLIC__/js/respond.min.js"></script>
      <![endif]-->
      <script src="__PUBLIC__/js/jquery.min.js"></script>
      <script src="__PUBLIC__/plugins/bootstrap/js/bootstrap.min.js"></script>
      <script src="__PUBLIC__/js/common.js"></script>
      <script src="__PUBLIC__/plugins/plugins/plugins.js"></script>
   </head>
   <script>
   function getAreaList(objId,parentId,t,id){
	   var params = {};
	   params.parentId = parentId;
	   $('#'+objId).empty();
	   if(t<1){
		   $('#areaId3').empty();
		   $('#areaId3').html('<option value="">请选择</option>');
	   }
	   var html = [];
	   $.post("{:U('Admin/Areas/queryByList')}",params,function(data,textStatus){
		    html.push('<option value="">请选择</option>');
			var json = WST.toJson(data);
			if(json.status=='1' && json.list.length>0){
				var opts = null;
				for(var i=0;i<json.list.length;i++){
					opts = json.list[i];
					html.push('<option value="'+opts.areaId+'" '+((id==opts.areaId)?'selected':'')+'>'+opts.areaName+'</option>');
				}
			}
			$('#'+objId).html(html.join(''));
	   });
   }
   $(function(){
       <?php if($areaId1!=0){ ?>
	   getAreaList("areaId2",'{$areaId1}',0,'{$areaId2}');
	   <?php } ?>  
	   <?php if($areaId2 != 0){ ?>
	   getAreaList("areaId3",'{$areaId2}',1,'{$areaId3}');
	   <?php } ?>
	   $('#orderStatus').val({$orderStatus});
   });
   </script>
   <body class='wst-page'>
      <form method="get" action="{:U('Admin/Orders/index')}">
      <input type="hidden" value="Admin" name="m"/>
      <input type="hidden" value="Orders" name="c"/>
      <input type="hidden" value="user_list" name="a"/>

       <div class='wst-tbar'>
        
       订单号：<input type='text' name='orderNo' id='orderNo' value='{$orderNo}'/>
        支付状态：  <select name='pay_status' id='pay_status'>
             <option value='-9999'>请选择</option>
             <option value='0' <if condition="$pay_status eq 0 && $pay_status != ''">selected="selected"</if>>未支付</option>
             <option value='1' <if condition="$pay_status eq 1">selected="selected"</if>>已支付</option>
          </select>
     订单状态：  <select name='order_status' id='order_status'>
             <option value='-9999'>请选择</option>
             <option value='0' <if condition="$order_status eq 0  && $order_status != ''">selected="selected"</if>>待抢单</option>
             <option value='1' <if condition="$order_status eq 1">selected="selected"</if>>已接单未取货</option>
             <option value='2' <if condition="$order_status eq 2">selected="selected"</if>>配送中</option>
             <option value='3' <if condition="$order_status eq 3">selected="selected"</if>>配送完成</option>
             <option value='4' <if condition="$order_status eq 4">selected="selected"</if>>已完成</option>
             <option value='5' <if condition="$order_status eq 5">selected="selected"</if>>用户取消</option>
          </select>
用户名：<input type='text' name='username' id='username' value='{$username}'/> 
       <button type="submit" class="btn btn-primary glyphicon glyphicon-search">查询</button> 
       </div>
       </form>
       <div class="wst-body"> 
        <table class="table table-hover table-striped table-bordered wst-list">
           <volist name="lists" id="vo" key='key'>
           <thead>
             <tr>
               <th colspan='6'>{$key}.订单：{$vo['id']}</th>
             </tr>
           </thead>
           <tbody>
             <tr>
               <td>{$vo['userPhone']}</td>
               <td>
                               ￥{$vo['money']}<br/>
                  <if condition="$vo['pay_type'] eq 1">
                  支付宝
                  <elseif condition="$vo['pay_type'] eq 2" />
                  微信支付
                  <else />
                  其他付款方式
                  </if>
               </td>
               <if condition="$vo['content']['type'] eq 3">
               <td>{$vo['content']['buy_address']}{$vo['content']['buy_number']}</td>
               <else />
               <td>{$vo['content']['go_address']}{$vo['content']['go_number']}</td>
               </if>
               <td>{$vo['content']['get_address']}{$vo['content']['get_number']}</td>
               <td>
               	<if condition="$vo['pay_status'] eq 1">
               	已支付
               	 <else />
               	 未支付
               	</if>
               </td>
               <td>
               <a class="btn btn-primary glyphicon" href="{:U('Admin/Orders/user_order_view',array('id'=>$vo['id']))}"">查看</a>&nbsp;
               </td>
             </tr>
             </volist>
             <tr>
                <td colspan='6' align='center'>{$page}</td>
             </tr>
           </tbody>
        </table>
       </div>
   </body>
</html>